1. Field of the Invention
The present invention relates to a technique for handing security data such as an ID code and a cipher key in remote keyless entry (RKE), when automatically locking or unlocking the door of a vehicle according to communication with a portable unit.
2. Description of the Related Art
FIG. 3 shows a block structure of remote keyless entry (RKE) and a method of handling the security data such as an ID code and a cipher key. In FIG. 3, a vehicle 1 has a door locking mechanism 5 and a detector 4 for detecting open/close of a door. Further, an in-vehicle unit 2 is set within the vehicle 1. In the in-vehicle unit 2, a portable unit authenticating unit 6 authenticates the ID of the portable unit after receiving a door locked signal or a door unlocked signal from the portable unit 20 through a portable unit receiving/transmitting antenna 3, and as a result of the authentication, when the ID is authenticated, a general controller 7 controls the door locking mechanism so as to lock or unlock the door. Here, an EEPROM 9 stores the ID (vehicle ID and portable unit ID) and the cipher key (the portable unit communicates with the vehicle through a signal encrypted by the cipher key) and a ROM 8 stores a program for general control.
Hitherto, as the remote keyless entry (RKE) for locking or unlocking the door locking mechanism of a vehicle, there are known a manual RKE that is in one-way communication from a portable unit to an in-vehicle unit as well as a passive RKE that is in two-way communication between a portable unit and an in-vehicle unit. This passive RKE is to lock or unlock the door of a vehicle automatically and perform two-way communication between a portable unit a user carries and an in-vehicle unit set in the vehicles. As a result of the recognition of the portable unit ID and the in-vehicle ID, when the in-vehicle unit authenticates the portable unit, it performs the locking or unlocking operation on the door locking mechanism 5. Each of the portable unit and the in-vehicle unit has a unique ID (Identification Code) and cipher key (Key) in order to authenticate with each other, and at a communication time, they communicate with each other through a signal obtained by encrypting the data including the ID with the cipher key.
In description of the concrete function of the passive RKE, the in-vehicle unit 2 transmits a request signal at regular intervals. The request signal, including the in-vehicle ID, can be received at only a short distance. When the portable unit 20 is out of the reach of a request signal, it cannot receive the request signal. While, when a person carrying the portable unit approaches the vehicle, coming into the reach of a request signal, the portable unit receives the request signal, checks the in-vehicle ID included in the request signal, and sends a response signal to the vehicle after confirming that it has been issued from the correct in-vehicle unit.
The in-vehicle unit receives the response signal, takes out the portable unit ID included therein, and compares it with the portable unit ID registered in a memory. In the case of agreement, it issues an unlocking signal to the door locking mechanism 5, to unlock (release) the door, while in the case of disagreement, it does not issue any control signal to the locking mechanism. When a user carrying the portable unit gets off the vehicle and goes far away, the in-vehicle unit issues a locking signal to the door locking mechanism at the point when the portable unit is not in a position to receive a request signal, namely, at the point when the in-vehicle unit is not in a position to receive a response signal.
A request signal and a response signal are encrypted with the cipher key stored by the portable unit and the in-vehicle unit in common and issued, and a receiving party decodes the signal with the cipher key stored in the receiving party.
Since the security data such as the ID and the cipher key should be kept in a memory even if a battery is removed, it is stored in a nonvolatile memory such as an EEPROM or a ROM. The data stored into the EEPROM or the ROM indicates the information value in the form of the original data. Especially, in the in-vehicle unit, it is stored in the EEPROM not in the ROM, because of the peculiar situation of the portable unit ID. This peculiar situation is that the portable unit ID is not initially stored in the in-vehicle, but that the in-vehicle unit, receiving a response signal from some portable unit (one vehicle includes a plurality of portable units having various IDs), analyzes the signal, takes out the portable unit ID previously stored in the same portable unit, and stores it into the self nonvolatile memory of the in-vehicle unit.
Since a car dealer and a user can do this work at any time, it is not necessary to make a match (pairing) of a portable unit and an in-vehicle unit in a manufacturing facility advantageously. However, since the ID will be registered afterward as mentioned above, ROM cannot be used as the storing medium. Further, through a signal transmitted from one to the other in the in-vehicle unit and the portable unit, the cipher key will be also registered in the other afterward (although FIG. 3 doesn't show a memory in the portable unit, the portable unit has a memory), and therefore, it will be stored in the EEPROM not in the ROM.